<html>
	{% include "../common_head.html" %}
	<body>
	{% include "../common_menus.html" %}
	<div id="content">
	
	{% if annotation %}
		<p><b>{{annotation.typeForDisplay|capfirst}} {{template_with_reference_to_the}} {{entry.typeForDisplay}} {{entry.linkString}}</b></p>
		{% ifequal annotation.type "comment" %}
			<p><b>{{annotation.shortString}}</b></p>
			<div class="blurb">{{annotation.longString_formatted}}</div>
		{% endifequal %}
		{% ifequal annotation.type "request" %}
			<p><b>{{annotation.shortString}}</b></p>
			<div class="blurb">{{annotation.longString_formatted}}</div>
		{% endifequal %}
		{% ifequal annotation.type "tag set" %}
			<div class="blurb">>{{annotation.tagsIfTagSet|join:", "}}</div>
		{% endifequal %}
		{% ifequal annotation.type "nudge" %}
			<ul>
			{% for i in num_nudge_categories|makeRange %}
				{% if rakontu.nudgeCategories|listLookup:i %}
					{% if annotation.valuesIfNudge|listLookup:i %}
						<li class="nobullet">{{rakontu.nudgeCategoryQuestions|listLookup:i}} ({{rakontu.nudgeCategories|listLookup:i}}): <b>{{annotation.valuesIfNudge|listLookup:i}}</b> </li>
					{% endif %}
				{% endif %}
			{% endfor %}
			</ul>			
			{% if annotation.shortString %}
				<p>{{template_comment}}: </p><ul><li class="nobullet">{{annotation.shortString}}</li></ul>
			{% endif %}
		{% endifequal %}
		<h2>{{entry.linkString}} ({{entry.typeForDisplay}})</h2>
		{% include "read_or_preview_entry.html" %}
		</div>
	{% endif %}
	
	{% if entry and not annotation %}
		<h2>{{entry.linkString}} ({{entry.typeForDisplay}})</h2>
		{% include "read_or_preview_entry.html" %}
		{% if answers_with_entry %}
			{% if rakontu_has_questions_for_this_entry_type %}
				<h4>{{template_answers}}</h4>
				<ul>
				{% for question in questions %}
					{% for answer in answers_with_entry %}
						{% ifequal question.key answer.question.key %}
							<li class="nobullet"><i>{{question.text}}</i>
							<ul><li class="nobullet">{{answer.displayStringShort}}</li></ul>
							</li>
						{% endifequal %}
					{% endfor %}
				{% endfor %}
				</ul>
			{% endif %}
		{% endif %}
		</div>
	{% endif %}
	
	<div id="rakontu_form_style" class="rakontu_form">
		<form action="/{{dir_visit}}/{{url_preview}}
		{% if annotation %}
			?{{annotation.urlQuery}}
		{% else %}
				{% if entry %}
					?{{entry.urlQuery}}
				{% endif %}
		{% endif %}
	" method="post" enctype="multipart/form-data">
		<p>
		<center>
			{% if annotation %}
				{% if annotation.inBatchEntryBuffer %}
					<input type="submit" name="edit" value="{{button_change}}" class="button">
					<input type="submit" name="batch" value="{{button_return_to_list}}" class="button">
				{% else %}
					<input type="submit" name="edit" value="{{button_change}}" class="button">
					<input type="submit" name="publish" value="{{button_publish}}" class="button">
				{% endif %}
			{% else %}
				{% if entry.inBatchEntryBuffer %}
					<input type="submit" name="edit" value="{{button_change_entry}}" class="button">
					<input type="submit" name="batch" value="{{button_return_to_list}}" class="button">
				{% else %}
					<input type="submit" name="edit" value="{{button_change}}" class="button">
					<input type="submit" name="profile" value="{{button_view_all_drafts}}" class="button">
					<input type="submit" name="publish" value="{{button_publish}}" class="button">
				{% endif %}
			{% endif %}
		</center>
	</form>
	</div>
	
	</div>
	{% include "../common_footer.html" %}
	</body>
</html>
